import Main from '@/views/Main.vue';
import { corporateCenterRouter } from '@/router/corporateCenter';
import { editViewResumeRouter, personalCenterRouter } from '@/router/personalCenter';
import { homePage } from '@/router/homaPage';
import { printResumeRouter } from './personalCenter';
import { signInPage, showCompanyInfo, webView } from './signIn';
// 不作为Main组件的子页面展示的页面单独写，如下
// 去掉多余的学生端登录
// export const loginRouter = {
//     path: '/login',
//     name: 'login',
//     meta: {
//         title: '登录'
//     },
//     component: () => import('@/views/login.vue')
// };

export const registRouter = {
    path: '/regist',
    name: 'regist',
    meta: {
        title: '注册'
    },
    component: () => import('@/views/regist.vue')
};

export const registResult = {
    path: '/regist-result',
    name: 'regist-result',
    meta: {
        title: '注册结果'
    },
    component: () => import('@/views/regist-result.vue')
};

export const agreement = {
    path: '/agreement',
    name: 'agreement',
    meta: {
        title: '毕业生协议'
    },
    component: () => import('@/views/agreement.vue')
};

export const reset = {
    path: '/reset',
    name: 'reset',
    meta: {
        title: '重置密码'
    },
    component: () => import('@/views/reset.vue')
};

export const proreset = {
    path: '/proreset',
    name: 'proreset',
    meta: {
        title: '省级重置密码'
    },
    component: () => import('@/views/proreset.vue')
};

export const scoreset = {
    path: '/scoreset',
    name: 'scoreset',
    meta: {
        title: '学校重置密码'
    },
    component: () => import('@/views/scoreset.vue')
};

export const activation = {
    path: '/activation',
    name: 'activation',
    meta: {
        title: '激活 '
    },
    component: () => import('@/views/activation.vue')
};

export const relateRouter = {
    path: '/relate',
    name: 'relate',
    meta: {
        title: '绑定账号'
    },
    component: () => import('@/views/relate.vue')
};

export const authorizeRouter = {
    path: '/authorize',
    name: 'authorize',
    meta: {
        title: '统一认证平台'
    },
    component: () => import('@/views/authorize.vue')
};

// export const page404 = {
//     path: '/*',
//     name: 'error-404',
//     meta: {
//         title: '404-页面不存在'
//     },
//     component: () => import('@/views/error-page/404.vue')
// };

export const page403 = {
    path: '/403',
    meta: {
        title: '403-权限不足'
    },
    name: 'error-403',
    component: () => import('@/views/error-page/403.vue')
};

export const sysLoginRouter = {
    path: '/syslogin',
    name: 'syslogin',
    meta: {
        title: '管理员登录'
    },
    component: () => import('@/views/sysLog.vue')
};
export const schoolLoginRouter = {
    path: '/edulogin',
    name: 'edulogin',
    meta: {
        title: '学校用户登录'
    },
    component: () => import('@/views/schoolLogin.vue')
};
// Provincial
export const provincialLoginRouter = {
    path: '/prologin',
    name: 'prologin',
    meta: {
        title: '省级用户登录'
    },
    component: () => import('@/views/provincialLogin.vue')
};
export const page500 = {
    path: '/500',
    meta: {
        title: '500-服务端错误'
    },
    name: 'error-500',
    component: () => import('@/views/error-page/500.vue')
};

// 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里
export const otherRouter = {
    path: '/',
    name: 'otherRouter',
    redirect: '/home',
    component: Main,
    children: [
        { path: 'home', title: { i18n: 'home' }, name: 'home_index', meta: { title: '河南省高校毕业生网上签约与毕业去向登记平台' }, component: () => import('@/views/home/home.vue') },
        { path: 'ownspace', title: '个人中心', name: 'ownspace_index', component: () => import('@/views/own-space/own-space.vue') },
        { path: 'message', title: '消息中心', name: 'message_index', component: () => import('@/views/message/message.vue') },
        { path: 'add', title: '添加', name: 'add', component: () => import('@/views/xboot-vue-template/new-window/add.vue') },
        { path: 'edit', title: '编辑', name: 'edit', component: () => import('@/views/xboot-vue-template/new-window/edit.vue') },
        { path: 'leave', title: '请假申请', name: 'leave', component: () => import('@/views/activiti/business/leave.vue') },
        { path: 'jyqx', title: '就业去向信息', name: 'jyqx', component: () => import('@/views/bys/jyqx/jyqxInfoTb.vue') },
        { path: 'jyqxManageEdit', title: '就业去向信息编辑', name: 'JyqxManageEdit', component: () => import('@/views/bys/jyqx/jyqxManageEdit.vue') },

        { path: 'historic-detail', title: '流程进度历史详情', name: 'historic_detail', component: () => import('@/views/activiti/historic-detail/historicDetail.vue') },
        { path: 'no-open', title: '未开放', name: 'no-open', component: () => import('@/views/noOpen.vue') },
        {
            path: 'theDoubleElectionWillBeAnnounced',
            title: '信息公示',
            meta: { title: '信息公示' },
            name: 'TheDoubleElectionWillBeAnnounced',
            component: () => import('@/views/recruitmentManagement/mutualSelection/informationAnnouncement.vue')
        },
        { path: 'examine', title: '简章详情', meta: { title: '简章详情' }, name: 'Examine', component: () => import('@/views/recruitmentManagement/recruitmentBrochureReview/examine.vue') },
        {
            path: 'releaseADoubleSelectionMeeting',
            title: '发布双选会',
            meta: { title: '发布双选会' },
            name: 'ReleaseADoubleSelectionMeeting',
            component: () => import('@/views/recruitmentManagement/mutualSelection/releaseADoubleSelectionMeeting.vue')
        },
        {
            path: 'careerTalks',
            meta: { title: '宣讲会', superior: '宣讲活动' },
            name: 'careerTalks',
            component: () => import('@/views/recruitmentManagement/careerTalks/index.vue')
        },
        {
            path: 'ReleasePresentation',
            title: '发布宣讲会',
            meta: { title: '发布宣讲会' },
            name: 'ReleasePresentation',
            component: () => import('@/views/recruitmentManagement/careerTalks/ReleasePresentation.vue')
        },
        {
            path: 'examineTeachIn',
            title: '宣讲会审核',
            meta: { title: '宣讲会审核' },
            name: 'examineTeachIn',
            component: () => import('@/views/recruitmentManagement/careerTalks/examine.vue')
        },
        {
            path: 'teachInSignIn',
            title: '签到管理',// TODO 宣讲会
            meta: { title: '签到管理' },// TODO 宣讲会
            name: 'teachInSignIn',
            component: () => import('@/views/recruitmentManagement/careerTalks/signIn.vue')
        },
        {
            path: 'boothAllocation',
            title: '展位分配',
            meta: { title: '展位分配' },
            name: 'BoothAllocation',
            component: () => import('@/views/recruitmentManagement/mutualSelection/boothAllocation.vue')
        },
        { path: 'checkInManagement', title: '签到管理', meta: { title: '签到管理' }, name: 'CheckInManagement', component: () => import('@/views/recruitmentManagement/mutualSelection/signIn.vue') },
        { path: 'addCampus', title: '添加校区', meta: { title: '添加校区' }, name: 'AddCampus', component: () => import('@/views/siteManagement/campusManagement/addCampus.vue') },
        { path: 'addSite', title: '添加场地', meta: { title: '添加场地' }, name: 'AddSite', component: () => import('@/views/siteManagement/placeManagement/addSite.vue') },
        { path: 'addAnAD', title: '添加广告', meta: { title: '添加广告' }, name: 'AddAnAD', component: () => import('@/views/siteManagement/advertisingManagement/addAnAD.vue') },
        { path: 'jobAudit/positionAudit', title: '职位审核', meta: { title: '职位审核' }, name: 'PositionAudit', component: () => import('@/views/recruitmentManagement/jobAudit/audit.vue') },
        { path: 'unitDetails', title: '用人单位查看', meta: { title: '用人单位查看' }, name: 'UnitDetails', component: () => import('@/views/recruitmentManagement/employer/unitDetails.vue') },
        { path: 'resumePreview', title: '简历预览', meta: { title: '简历预览' }, name: 'ResumePreview', component: () => import('@/views/recruitmentManagement/resumeManagement/resumePreview.vue') },
        {
            path: 'detailsOfStudentOrigin',
            title: '生源信息查询',
            meta: { title: '生源信息查询' },
            name: 'DetailsOfStudentOrigin',
            component: () => import('@/views/recruitmentManagement/enterpriseService/detailsOfStudentOrigin.vue')
        },
        { path: 'addHelpers', title: '添加帮扶对象', meta: { title: '帮扶对象管理' }, name: 'AddHelpers', component: () => import('@/views/hardshipSupport/addHelpers.vue') },
        { path: 'lookStandingBook', title: '查看台账', meta: { title: '台账查看' }, name: 'LookStandingBook', component: () => import('@/views/hardshipSupport/lookStandingBook.vue') },
        {
            path: 'auditEnterprise',
            name: 'doubleSelectionOfEnterpriseQualificationAudit',
            meta: { title: '双选会企业资质审核' },
            component: () => import('@/views/recruitmentManagement/mutualSelection/auditEnterprise.vue')
        },
        {
            path: 'doubleSelectionMeetingDetails',
            name: 'DoubleSelectionMeetingDetails',
            meta: { title: '双选会详情' },
            component: () => import('@/views/recruitmentManagement/mutualSelection/viewDetailsAboutADoubleMeeting.vue')
        },
        {
            path: 'positionDetail',
            name: 'PositionDetail',
            meta: { title: '职位详情' },
            component: () => import('@/views/recruitmentManagement/mutualSelection/positionDetail.vue')
        },
        {
            path: 'archiveTransferSelect',
            name: 'ArchiveTransferSelect',
            meta: { title: '档案信息详情' },
            component: () => import('@/views/archivesManagement/archiveTransferSelect.vue')
        },
        {
            path: 'archiveReviewHistory',
            name: 'ArchiveReviewHistory',
            meta: { title: '档案审核详情' },
            component: () => import('@/views/archivesManagement/archiveReviewHistory.vue')
        },
        {
            path: 'archiveTransferInfoEdit',
            name: 'ArchiveTransferInfoEdit',
            meta: { title: '档案转递信息编辑' },
            component: () => import('@/views/archivesManagement/archiveTransferInfoEdit.vue')
        },
        {
            path: 'archiveReviewInfo',
            name: 'ArchiveReviewInfo',
            meta: { title: '档案审核历史' },
            component: () => import('@/views/archivesManagement/archiveReviewInfo.vue')
        },
        {
            path: 'accountReviewHistory',
            name: 'AccountReviewHistory',
            meta: { title: '户口审核详情' },
            component: () => import('@/views/accountManagement/accountReviewHistory.vue')
        },
        {
            path: 'accountSelect',
            name: 'AccountSelect',
            meta: { title: '户口详情' },
            component: () => import('@/views/accountManagement/accountSelect.vue')
        },
        {
            path: 'accountEdit',
            name: 'AccountEdit',
            meta: { title: '户口详情' },
            component: () => import('@/views/accountManagement/accountEdit.vue')
        },
        {
            path: 'importHistory',
            name: 'ImportHistory',
            meta: { title: '导入历史' },
            component: () => import('@/views/importHistory/importHistory.vue')
        },
        {
            path: 'dataWarningInfo',
            name: 'AataWarningInfo',
            meta: { title: '数据预警详情' },
            component: () => import('@/views/dataVerification/dataWarningInfo.vue')
        },
        {
            path: 'checkDetails',
            name: 'CheckDetails',
            meta: { title: '核查详情' },
            component: () => import('@/views/dataVerification/checkDetails.vue')
        },
        {
            path: 'whiteList',
            name: 'WhiteList',
            meta: { title: '用人单位白名单' },
            component: () => import('@/views/dataVerification/whiteList.vue')
        },
        {
            path: 'accountReviewInfo',
            name: 'AccountReviewInfo',
            meta: { title: '户口审核历史' },
            component: () => import('@/views/accountManagement/accountReviewInfo.vue')
        },
        { path: 'detailAudit', title: '职位审核', name: 'DetailAudit', meta: { title: '职位审核' }, component: () => import('@/views/recruitmentManagement/mutualSelection/detailAudit.vue') },
        { path: 'fileUploadHistory', name: 'FileUploadHistory', meta: { title: '文件上传历史' }, component: () => import('@/views/bys/xj/fileUploadHistory.vue') },
        { path: 'batch-img-auth', name: 'BatchImgAuth', meta: { title: '鉴权图片查看' }, component: () => import('@/views/batchImgAuth/index.vue') },

    ]
};


export const syscannotuse = {
    path: '/notuse',
    meta: {
        title: '服务器维护中'
    },
    name: 'notuse',
    component: () => import('@/views/SysCannotUse.vue')
};
export const appRouter = [];

// 所有上面定义的路由都要写在下面的routers里
export const routers = [
    printResumeRouter,
    // loginRouter,
    registRouter,
    registResult,
    reset,
    proreset,
    agreement,
    scoreset,
    activation,
    relateRouter,
    authorizeRouter,
    otherRouter,
    ...appRouter,
    page500,
    page403,
    sysLoginRouter,
    schoolLoginRouter,
    provincialLoginRouter,
    corporateCenterRouter,
    personalCenterRouter,
    homePage,
    signInPage,
    showCompanyInfo,
    webView,
    syscannotuse
];
